<?php
include "../soar/soar.inc";

function main($soar, $code)
{/*{{{*/
    $confirm=$soar->confirm();

    $token=$_COOKIE['confirm_token'];
    $res=$confirm->submit($token, $code);
    if($res == false)
    {
        $soar->view['succeed']=false;
        return;
    }
    $soar->view['succeed']=true;
}/*}}}*/

$soar=new soar();
main($soar, $_POST['input_code']);
$soar->close();
$VIEW=$soar->view;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<?php
if($VIEW['succeed'] == true)
{
    echo "验证成功<br/>";
}
else
{
    echo "验证失败，转回<a href=\"confirm.php\">验证页面</a><br/>";
}
?>
</body>
</html>
